/**
 * 
 */
package com.qf.dao.impl;

import java.util.List;

import com.qf.common.dao.hibernate.HibernateCommonDAO;
import com.qf.dao.CourseDao;
import com.qf.domain.Course;

/**
 * @author 123
 * 
 */
public class CourseDaoImpl extends HibernateCommonDAO implements CourseDao {

	public Integer create(Course course) {
		return (Integer) super.create(course);
	}

	protected void initDao() throws Exception {
		super.initDao();
		this.setEntityClass(Course.class);
	}

	public List<Course> listFew() {
		String sql = "select * from course order by id desc limit 0,20";
		return this.getSession().createSQLQuery(sql).addEntity(Course.class)
				.list();
	}

}
